<%= form_for(@book, :html => {:class => "tabular"}) do |f| %>
  <% if @book.errors.any? %>
    <div id="error_explanation">
      <h3><%= pluralize(@book.errors.count, "error") %> prohibited this book from being saved:</h3>

      <ul>
      <% @book.errors.full_messages.each do |msg| %>
        <li><%= msg %></li>
      <% end %>
      </ul>
    </div>
  <% end %>

  <div class="form-row">
    <%= f.label :title, 'Title' %>
    <%= f.text_field :title %>
  </div>
  <div class="form-row">
    <%= f.label :cover_type, 'Cover Type' %>
    <%= f.select :cover_type, [['Soft', 'Soft'], ['Hard', 'Hard']] %>
  </div>
  <div class="form-row">
    <%= f.label :has_isbn, 'Has ISBN?' %>
    <%= f.check_box :has_isbn, {:checked => true} %>
  </div>
  <div class="form-row">
    <%= f.label :isbn, 'ISBN' %>
    <%= f.text_field :isbn %>
  </div>
  <div class="form-row">
    <%= f.label :author, 'Author' %>
    <%= collection_select :book, :author_id, Author.all, :id, :full_name %>
  </div>
  <div class="form-row">
    <%= f.label :owner, 'Owner' %>
    <%= select :book, :owner, options_for_select(Rails.configuration.owners, @book.owner) %>
  </div>
  <div class="form-row">
    <%= f.label :location, 'Location' %>
    <%= select :book, :location, options_for_select(Rails.configuration.locations, @book.location) %>
  </div>
  <div class="form-row">
    <%= f.label :synopsis, 'Synopsis' %>
    <%= f.text_area :synopsis %>
  </div>
  <Br />
  <div class="form-row center">
    <%= f.submit %>
  </div>
<% end %>
